<table width="100%"  border="0" cellpadding="5px" style="border-collapse:separate; border-spacing:0px 20px;">
  <tr>
    <th width="15%" scope="row">周期类型：</th>
    <td width="85%"><input type="radio" name="gasmember_type" class="gasmember_type" value="1" <?php if($info['gasmember_type']==1||empty($info['gasmember_type'])):?>checked="checked"<?php endif;?>  />每周 <input type="radio" name="gasmember_type" class="gasmember_type" value="2" <?php if($info['gasmember_type']==2):?>checked="checked"<?php endif;?>/>每月</td>
  </tr>
  <tr>
    <th scope="row">周期值：</th>
    <td>
    
    <div id="week" style="<?php if($info['gasmember_type']==1||empty($info['gasmember_type'])):?>display:block;<?php else:?>display:none;<?php endif;?>" >
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(1,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?>  value="1" />周一
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(2,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> value="2"/>周二
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(3,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> value="3"/>周三
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(4,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> value="4"/>周四
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(5,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> value="5"/>周五
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(6,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> value="6"/>周六
    <input type="checkbox" name="week_value[]" <?php if($info['gasmember_type']==1&&!empty($info['gasmember_type_value'])&&in_array(0,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> value="0"/>周日
    </div>
    
    
    <div id="month" style="<?php if($info['gasmember_type']==2):?>display:block;<?php else:?>display:none;<?php endif;?>">
    
    <?php for($i=1;$i<=31;$i++):?>
    <input type="checkbox" name="month_value[]" value="<?php echo $i;?>" <?php if($info['gasmember_type']==2&&!empty($info['gasmember_type_value'])&&in_array($i,$info['gasmember_type_value'])):?>checked="checked"<?php endif;?> onclick="javascript:alert_msg(this)"  /><?php echo $i?>号
    <?php endfor;?>
    </div>
    
    </td>
  </tr>
  <tr>
    <th scope="row">挂牌价降幅：</th>
    <td>- <input type="text" name="gasmember_yz_price_decline" value="<?php echo $info['gasmember_yz_price_decline']?>" style=" padding:5px; width:50px;" />元</td>
  </tr>
  <tr>
    <th scope="row">私家车降幅：</th>
    <td>- <input type="text" name="gasmember_decline_price" value="<?php echo $info['gasmember_decline_price']?>" style=" padding:5px;width:50px;" />元</td>
  </tr>
  <tr>
    <th scope="row">网约车降幅：</th>
    <td>- <input type="text" name="gasmember_net_decline_price" value="<?php echo $info['gasmember_net_decline_price']?>" style=" padding:5px;width:50px;" />元</td>
  </tr>
  <input type="hidden" name="gm_id" value="<?php echo $info['id']?>" />
</table>
<script>
$('.gasmember_type').click(function(){

	 var gasmember_type=$(this).val();	
	
		 if(gasmember_type==1){
			
			 	$('#month').css('display','none');
				$('#week').css('display','block');
			}else if(gasmember_type==2){
				
				$('#month').css('display','block');
				$('#week').css('display','none');
			}
	})
function alert_msg(t){

	if($(t).prop('checked')==true&&($(t).val()==30||$(t).val()==31)){
    
    alert('注意！不足30天或者31天的月份会把月底最后一天设为会员');
	
	
	}
}
</script>